function sleep(n){
var now = new Date();
var exitTime = now.getTime() + n;
while (true) {
	now = new Date();
	if (now.getTime() > exitTime) {
		return;
	}
}
}
onmessage=function(event){
	var num=event.data;
	console.log("接收到主线程发来的数据"+num)
	sleep(2000)
	var result=Math.sqrt(num)
	postMessage(result)
}